// var easyuiPanelOnMove = function(left, top) {
//     var parentObj = $(this).panel('panel').parent();
//     if (left < 0) {
//         $(this).window('move', {
//             left : 1
//         });
//     }
//     if (top < 0) {
//         $(this).window('move', {
//             top : 1
//         });
//     }
//     var width = $(this).panel('options').width;
//     var height = $(this).panel('options').height;
//     var right = left + width;
//     var buttom = top + height;
//     var parentWidth = parentObj.width();
//     var parentHeight = parentObj.height();
//     if(parentObj.css("overflow")=="hidden"){
//         if(left > parentWidth-width){
//             $(this).window('move', {
//                 "left":parentWidth-width
//             });
//         }
//         if(top > parentHeight-height){
//             $(this).window('move', {
//                 "top":parentHeight-height
//             });
//         }
//     }
// };
// $.fn.panel.defaults.onMove = easyuiPanelOnMove;
// $.fn.window.defaults.onMove = easyuiPanelOnMove;
// $.fn.dialog.defaults.onMove = easyuiPanelOnMove;

//转化时间
function transTime(value) {
    if(value<=1000){
        return "";
    }
    var date = new Date(value);
    var fullYear = date.getFullYear();
    var month = date.getMonth()+1;
    var day = date.getDate();
    var week = date.getDay();
    if(week==0){
        week="星期日";
    }
    if(week==1){
        week="星期一";
    }
    if(week==2){
        week="星期二";
    }
    if(week==3){
        week="星期三";
    }
    if(week==4){
        week="星期四";
    }
    if(week==5){
        week="星期五";
    }
    if(week==6){
        week="星期六";
    }
    return fullYear + "年/" + month + "月/" + day + "日"+"  "+week;
}


//转化时间 带有星期
function transTimeHasWeek(value) {
    if(value<=1000){
        return "";
    }
    var date = new Date(value);
    var fullYear = date.getFullYear();
    var month = date.getMonth()+1;
    var day = date.getDate();
    var week = date.getDay();
    if(week==0){
        week="星期日";
    }
    if(week==1){
        week="星期一";
    }
    if(week==2){
        week="星期二";
    }
    if(week==3){
        week="星期三";
    }
    if(week==4){
        week="星期四";
    }
    if(week==5){
        week="星期五";
    }
    if(week==6){
        week="星期六";
    }
    return fullYear + "年/" + month + "月/" + day + "日"+"  "+week;
}


//转化时间 没有星期
function transTimeNoWeek(value) {
    if(value<=1000){
        return "";
    }
    var date = new Date(value);
    var fullYear = date.getFullYear();
    var month = date.getMonth()+1;
    var day = date.getDate();
    var week = date.getDay();
    return fullYear + "年/" + month + "月/" + day + "日";
}

//转化时间 java格式
function transTimeJava(value) {
    var date = new Date(value);
    var fullYear = date.getFullYear();
    var month = date.getMonth()+1;
    var day = date.getDate();
    return fullYear + "/" + month + "/" + day;
}


//转化时间 java格式
function getOrderTime() {
    var date = new Date();
    var fullYear = date.getFullYear();
    var month = date.getMonth()+1;
    var day = date.getDate();
    fullYear=fullYear.toString().substr(2);
    if(month.toString().length<2){
        month="0"+month;
    }
    if(day.toString().length<2){
        day="0"+day;
    }
    return fullYear + "" + month + "" + day;
}


function getPersonType (value) {
    if(value==1){
        return "销售员";
    }
    if(value==2){
        return "技术员";
    }
    if(value==3){
        return "计划员";
    }
    if(value==4){
        return "采购员";
    }
    if(value==5){
        return "仓管员";
    }
    if(value==6){
        return "财务员";
    }
}

